{* Smarty *}
{include file="page_header.tpl" page="index"}
<!-- Phase -->
<div class="span-24 center">
  <div class="span-24">
    <h2 id="slogan">내가 사는 곳의 문제를 <span style="color:#6baabc">알리고, 제안하고, 바꿔나가기</span></h2>
  </div>
  <div class="span-24 prepend-top append-bottom">
    <h3 id="do-search">지역 이름을 찾아 보세요!</h3>
  </div>
</div>
<!-- Search -->
<div id="search-area" class="span-24 center">
  <!-- Hidden form -->
  <form id="address-form" method="post" action="list_reports.php" style="display:none">
    <p><input id="address-entry" type="hidden" name="address"></input></p>
  </form>
  <div id="address-search-entry" class="float-left">
    <input class="span-10 title" id="address-search" type="text" />
  </div>
  <div id="address-search-button" class="float-left image-button" style="margin-left:10px">
    <span class="search-string">검색</span>
  </div>
</div>
<!-- ~Search -->

<!-- Photos -->
<div id="photo-string" class="span-24 left append-bottom" style="margin:20px 0 0 0">
  <h3>새롭게 알려진 지역 문제</h3>
</div>
<div class="span-24 append-bottom" style="margin-bottom:16px">
  <ul id="photos" class="jcarousel-skin-tango">
    {if $recent_images != null}
    {foreach from=$recent_images item=image}
    <li>
      <div onclick="window.location.href='view_report.php?id={$image.id}'" style="border:1px solid gray;width:75px;height:75px;background:white url(photos/{$image.img}_thumb) center;cursor:pointer;"></div>
    </li>
    {/foreach}
    {/if}
  </ul>
</div>
<!-- ~Photos -->

<!-- Contents of main -->
<div class="span-24">
  <div id="how-to-report" class="span-8">
    <h3>어떻게 알릴 수 있나요?</h3>
    <ol>
      <li>검색창에 알리고 싶은 지역을 검색합니다.</li>
      <li>지도 위에 문제가 있는 곳을 표시합니다.</li>
      <li>문제에 대한 상세한 내용을 기록합니다.</li>
      <li>처리결과를 이메일로 기다립니다.</li>
    </ol>
  </div>
  
  <div id="recent-reports" class="span-8 last">
    <h3>최근 알려진 내용</h3>
    <ul>
      {if $recent_reports != null}
      {foreach from=$recent_reports item=report}
      <li>
	<a href="view_report.php?id={$report.id}">{$report.subject|shorten_title}&nbsp;[{$report.update}]
	  {if $report.state == "1"}
	  <span style="color:black">- FIXED!</span>
	  {/if}
	</a>
      </li>
      {/foreach}
      {/if}
    </ul>
  </div>



  <div id="diy-updates" class="span-8">
    <h3>사이트 이용 현황</h3>
    <div class="span-8">
    <ul>
      <li>최근 알려진 건수 : <span class="count">{$week_count}</span></li>
      <li>처리된 건수 : <span class="count">{$month_count}</span></li>
      <li>부분 처리된 건수 : <span class="count">{$partial_count}</span></li>
      <li>총 알려진 건수 : <span class="count">{$total_count}</span></li>
    </ul>
    </div>
  </div>
  
</div>
<!-- ~Contents of main -->
{include file="page_footer.tpl"}
